package com.happyscan138.makefun.model;

import java.text.DateFormat;
import java.util.Date;

import static com.loopj.android.http.AsyncHttpClient.log;

/**
 * Created by madhur on 17/01/15.
 */
public class ChatMessage {
    public int type;
    public final static int TYPE_SEND = 0; //本人发的消息
    public final static int TYPE_RESPONSE = 1; //对方发的消息
    public final static int TYPE_SEND_IMAGE = 2; //自己发的图片
    public final static int TYPE_RESPONCE_IMG= 5;//对方发送的图片
    public final static int TYPE_RESPONCE_VIDEO = 6; //自己发送视频
    public final static int TYPE_SEND_VIDEO = 3; //自己发送视频
    public final static int TYPE_SEND_VOICE = 4; //自己发送语音
    public float Recordtime;//时间长度
    public void setType(int type) {
        this.type = type;
    }
    public String content;
    public String time;
    public String left_head;
    public String right_head;
    public String mongo;
    public int msg_type;
    public String thumb_resource;

    public ChatMessage(int type,String content)
    {
        this.type = type;
        this.mongo = content;
        log.e("filePath",content);
        this.time = DateFormat.getTimeInstance().format(new Date(System.currentTimeMillis()));
    }
    public ChatMessage(String content,int type)
    {
        this.type = type;
        this.content = content;
        log.e("filePath",content);
        this.time = DateFormat.getTimeInstance().format(new Date(System.currentTimeMillis()));
    }

    public ChatMessage() {

    }

    public int getType() {
        return type;

    }

    public String getContent() {
        return content;
    }

    public String getTime() {
        return time;
    }
    public ChatMessage(float recordtime, String filePath,String right_head) {

        Recordtime = recordtime;
        this.mongo = filePath;
        this.right_head=right_head;
    }
}
